package o;

public abstract class gal {
    public gab ʻ;
    public float ʻॱ;
    public gab ʼ;
    public gaj ʽ;
    public int ˊॱ;
    public gal ˋ;
    public int ˋॱ;
    private final fyl ˎ;
    public final fyl ˏॱ;
    public float ͺ;
    public int ॱ;
    public float ॱˊ;
    public float ॱˋ;
    public gal ॱॱ;
    protected final gaz ॱᐝ;
    public gaj ᐝ;
    public float ᐝॱ;

    public abstract void ˊ(fyl o_fyl, fzn o_fzn, fzn o_fzn2);

    protected gal(gaz o_gaz) {
        this.ᐝ = null;
        this.ʽ = null;
        this.ˎ = new fyl();
        this.ʻ = null;
        this.ʼ = null;
        this.ᐝ = new gaj();
        this.ʽ = new gaj();
        this.ˏॱ = new fyl();
        this.ॱᐝ = o_gaz;
    }

    public void ˎ(gab o_gab, int i, gab o_gab2, int i2) {
        this.ॱ = 4;
        this.ʻ = o_gab;
        this.ʼ = o_gab2;
        this.ˊॱ = i;
        this.ˋॱ = i2;
        this.ˏॱ.ˏ = 0;
        this.ˋ = null;
        this.ॱॱ = null;
        this.ᐝ.ॱ = null;
        this.ᐝ.ˋ = null;
        this.ᐝ.ˊ = null;
        this.ᐝ.ˎ = null;
        this.ʽ.ॱ = null;
        this.ʽ.ˋ = null;
        this.ʽ.ˊ = null;
        this.ʽ.ˎ = null;
        this.ͺ = 0.0f;
        this.ʻॱ = ˏ(o_gab.ˊ, o_gab2.ˊ);
        this.ॱˋ = ॱ(o_gab.ʼ, o_gab2.ʼ);
        this.ᐝॱ = 0.0f;
    }

    public fyl ॱ() {
        return this.ˏॱ;
    }

    public boolean ˎ() {
        return (this.ॱ & 2) == 2;
    }

    public void ˎ(boolean z) {
        if (z) {
            this.ॱ |= 4;
        } else {
            this.ॱ &= -5;
        }
    }

    public boolean ˋ() {
        return (this.ॱ & 4) == 4;
    }

    public gal ˏ() {
        return this.ॱॱ;
    }

    public gab ˊ() {
        return this.ʻ;
    }

    public int ᐝ() {
        return this.ˊॱ;
    }

    public gab ʽ() {
        return this.ʼ;
    }

    public int ʻ() {
        return this.ˋॱ;
    }

    public void ˋ(fyd o_fyd) {
        int i;
        this.ˎ.ˏ(this.ˏॱ);
        this.ॱ |= 4;
        boolean z = (this.ॱ & 2) == 2;
        boolean ˋ = this.ʻ.ˋ();
        boolean ˋ2 = this.ʼ.ˋ();
        if (ˋ || ˋ2) {
            i = true;
        } else {
            i = 0;
        }
        fzt ॱ = this.ʻ.ॱ();
        fzt ॱ2 = this.ʼ.ॱ();
        fzn ˏ = ॱ.ˏ();
        fzn ˏ2 = ॱ2.ˏ();
        if (i != 0) {
            ˋ = this.ॱᐝ.ʻ().ˊ(this.ʻ.ˏ(), this.ˊॱ, this.ʼ.ˏ(), this.ˋॱ, ˏ, ˏ2);
            this.ˏॱ.ˏ = 0;
        } else {
            ˊ(this.ˏॱ, ˏ, ˏ2);
            if (this.ˏॱ.ˏ > 0) {
                ˋ = true;
            } else {
                ˋ = false;
            }
            for (int i2 = 0; i2 < this.ˏॱ.ˏ; i2++) {
                fyo o_fyo = this.ˏॱ.ˊ[i2];
                o_fyo.ˎ = 0.0f;
                o_fyo.ˏ = 0.0f;
                fyn o_fyn = o_fyo.ˋ;
                for (int i3 = 0; i3 < this.ˎ.ˏ; i3++) {
                    fyo o_fyo2 = this.ˎ.ˊ[i3];
                    if (o_fyo2.ˋ.ˎ(o_fyn)) {
                        o_fyo.ˎ = o_fyo2.ˎ;
                        o_fyo.ˏ = o_fyo2.ˏ;
                        break;
                    }
                }
            }
            if (ˋ != z) {
                ॱ.ˏ(true);
                ॱ2.ˏ(true);
            }
        }
        if (ˋ) {
            this.ॱ |= 2;
        } else {
            this.ॱ &= -3;
        }
        if (o_fyd != null) {
            if (!z && ˋ) {
                o_fyd.ˋ(this);
            }
            if (z && !ˋ) {
                o_fyd.ˎ(this);
            }
            if (i == 0 && ˋ) {
                o_fyd.ˎ(this, this.ˎ);
            }
        }
    }

    public static final float ˏ(float f, float f2) {
        return fzm.ʼ(f * f2);
    }

    public static final float ॱ(float f, float f2) {
        return f > f2 ? f : f2;
    }
}
